package com.qunduikj.sjb.sdk.model.enums;

/**
 * @author litao
 */
public enum MutilPhoneState {

    Calling(1, "通话中"),
    Connetting(2, "等待接通"),
    NoResponse(3, "无响应"),
    Exit(4, "已退出"),
    NotConneted(5, "无法接通");

    // 定义私有变量
    private Integer code;
    private String desc;

    MutilPhoneState(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String valueOf(int type) {
        MutilPhoneState status[] = MutilPhoneState.values();
        for (int i = 0; i < status.length; i++) {
            MutilPhoneState pw = status[i];
            if (pw.getCode() == type) {
                return pw.getDesc();
            }
        }
        return "";
    }

}